import fetch from '@/utils/fetch'

const SpuApi = {
  getPageList (params) {
    return fetch({
      url: '/api/spu/page',
      method: 'get',
      params: params
    })
  },
  init (params) {
    return fetch({
      url: '/api/spu/init',
      method: 'get',
      params: params
    })
  },
  initSpu (params) {
    return fetch({
      url: '/api/spu/list',
      method: 'get',
      params: params
    })
  },
  add (params) {
    return fetch({
      url: '/api/spu/add',
      method: 'post',
      data: params
    })
  },
  update (id, params) {
    return fetch({
      url: '/api/spu/' + id,
      method: 'put',
      data: params
    })
  },
  
  del (params,businessIdParams) {
    return fetch({
      url: '/api/spu/' + params ,
      method: 'delete',
      data: businessIdParams
    })
  }
}
export default SpuApi
